#ifndef DW_GRAPHICS_TEXTURE_H
#	define DW_GRAPHICS_TEXTURE_H

#	include "pixelbuffer.h"
#include "system/disposable.h"

namespace dw
{
namespace graphics
{

	using system::IDisposable;

class ITexture : public IPixelBuffer, public IDisposable
{
public:

	enum Type		{ TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP };
	
	enum Filter	{ TF_POINT, TF_LINEAR, TF_BILINEAR, TF_ANISOTROPIC };
	
public:

	ITexture() {}

	//ITexture(Renderer* renderer, const unsigned width, const unsigned height, const Usage usage);

	//ITexture(Renderer* renderer, std::istream& stream, const Usage usage);

	ITexture(const Type& type, const PixelFormat& pixelFormat, const unsigned width, const unsigned height, const Usage& usage);
	
	virtual ~ITexture() {}



	const Type& getType()		const { return _type; }



	virtual void load(std::istream& is);

	virtual void resize(const unsigned mipmap, const uint32 size) = 0;

	virtual void write(const unsigned mipmap, const uint32 offset, const uint32 size, const void* src) = 0;

protected:

	std::string _name;
	
	unsigned _id;
	
	Type _type;

	uint32 _numMipMaps;

	bool _compressed;
};

} // namespace graphics
} // namespace dw

#endif // !DW_GRAPHICS_TEXTURE_H
